<extend name="Public/base"/>

<block name="style">
<style>
.school_container{ width:200px; overflow:hidden; float:left; margin:0 10px 0 0; border:1px solid #CCC;}
.school_item{background-color:#CCC; padding:5px;}
.xi_container{padding:5px;}
.xi_container li{list-style-type:none;}
</style>
</block>

<block name="body">
	<div class="main-title cf">
        <h2>关联系</h2>
    </div>
    <form action="{:U('School/doRelation')}" method="post" class="form-horizontal">
       <div class="form-item">
	       <volist name="schoolList" id="school">
	       		<div class="school_container">
	       			<div class="school_item">{$school.title}</div>
	       			<div class="xi_container">
	       				<volist name="xiList" id="xi">
	       					<li>
	       						<label>
	       							<input type="checkbox" <if condition="isRelationed($school['id'], $xi['id'], $relationList)">checked="checked"</if> name="{$school.id}[]" value="{$xi.id}" />{$xi.title}
	       						</label>
	       					</li>
	       				</volist>
	       			</div>
	       		</div>
	       </volist>
       </div>
       <div style="clear:both;"></div>
       <div class="form-item" style="margin-top:10px;">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>   
</block>
